<template>
  <div>
    <el-container>
      <el-header>
        <el-menu
          :default-active="activeIndex"
          class="el-menu-demo"
          mode="horizontal"
          @select="handleSelect"
          style="width:1280px;position: relative;
  left: -20px;"
        >
          <el-menu-item index="/index_worker/projecthead/showdispatch">派工</el-menu-item>
          <el-menu-item index="/index_worker/projecthead/showrepair">维修</el-menu-item>
          <el-menu-item index="/index_worker/projecthead/showsecurity">安全检查</el-menu-item>
          <!-- <el-input class="divinputp" v-model="keyword" placeholder="请输入要查找的内容"></el-input>
          <el-button class="divbuttonleftp" type="primary" @click="search(keyword)">查 找</el-button> -->
        </el-menu>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
        keyword:'',
      activeIndex: "/index_worker/projecthead/showdispatch"
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      this.$router.push(key);
      console.log(key, keyPath);
    },
    search(keyword) {
      console.log("传值前的keyword:::" + keyword);
      this.$router.push({
        //借用manager页面中的搜索跳板
        path: "/index_manager/util",
        query: {
          keyword: keyword,
          tage: "manager"
        }
      });
    }
  },
  components: {}
};
</script>

<style scope>
.divinputp {
  width: 200px;
  position: relative;
  left: +350px;
}
.divbuttonleftp {
  position: relative;
  left: +360px;
}
</style>
